﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTO;
using BUS;
namespace WEBSITE_BANDEAL.Admin
{
    public partial class loaisp_status : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int ma = int.Parse(Request.QueryString["id"]);
            string chuoi = "";
            LOAI_SANPHAM lsp = LOAI_SAN_PHAMBUS.GetByID(ma);
            if (lsp.Trangthai == 1)
            {
                lsp.Trangthai = 0;
                chuoi = "../Template/images/admin/cancel.png";
            }
            else
            {
                lsp.Trangthai = 1;
                chuoi = "../Template/images/admin/check.png";
            }
            LOAI_SAN_PHAMBUS.update_status(lsp);
            Response.Write(chuoi);
        }
    }
}